﻿#region Copyright(C) 2018 FI Ltd. All rights reserved.

// ==================================================================================================
// Copyright(C) 2018 FI Ltd. All rights reserved.
//
// SYSTEM NAME	:   FI.Net Application Framework 
// COMPONENT ID :   FI.EntityFramework
// COMPONENT DESC:  
//
// CREATED DATE/BY: 18 Aug 2018 / Tian Mi
//
// REVISION HISTORY:	DATE/BY			SR#/CS/PM#/OTHERS		DESCRIPTION OF CHANGE
// ==================================================================================================

#endregion

using System.Data.Common;
using System.Data.Entity;

namespace FI.EntityFramework.Interception
{
    /// <summary>
    /// Exposes methods for customizing the <see cref="DbCommand"/>.
    /// </summary>
    internal interface IDbCommandHelper
    {
        /// <summary>
        /// Resets the current command for FI audit trial.
        /// </summary>
        /// <param name="dbContext">The context to associate.</param>
        void ResetDeleteCommand(DbContext dbContext);

        /// <summary>
        /// Validates the current command if it's a delete command.
        /// </summary>
        /// <returns>if set to <c>true</c> the current command is delete command.</returns>
        bool ValidateDeleteCommand();

        /// <summary>
        /// Gets the command being executed.
        /// </summary>
        /// <value>
        /// The command being executed.
        /// </value>
        DbCommand Command { get; }
    }
}